package l2hc.commons.net.nio.impl;

import l2hc.commons.net.nio.BasePacket;

public class TempBan extends BasePacket
{
	public TempBan(String accountName, String ip, long time, String reason)
	{
		writeC(10);
		writeS(accountName);
		writeS(ip);
		writeQ(System.currentTimeMillis() + time * 60000L);
		if (reason != null)
		{
			writeC(1);
			writeS(reason);
		}
		else {
			writeC(0);
		}
	}

	public TempBan(String accountName, String ip, long time) {
		this(accountName, ip, time, null);
	}

	public byte[] getContent()
	{
		return getBytes();
	}
}